<template>
  <keep-alive>
    <component :is="currentTabComponent" v-if="show" />
  </keep-alive>
</template>

<script>
  import V1 from './V1/index'
  import V2 from './V2/index'
  import DeviceComponentMixin from '@/mixin/DeviceComponentMixin'
  import { dclassCodeMap } from '@/utils/constant'
  export default {
    components: {
      V1,
      V2,
    },
    mixins: [DeviceComponentMixin],
    data() {
      return {
        currentTabComponent: V1,
      }
    },
    computed: {
      show() {
        return (
          Number(this.$store.getters.currentDevice.product_type) ===
          dclassCodeMap.gd
        )
      },
    },
    methods: {},
  }
</script>

<style lang="scss" scoped></style>
